package com.globallogic.vkulyk.JaxbHandler;

import static org.junit.Assert.*;

import javax.xml.bind.JAXBException;

import org.junit.*;

public class Unit_JaxbHandler extends JaxbHandlerTester {

	@Before
	public void setup() {
		setVarsFromPropertiesFile("src/test/resources/testing.properties");
	}

	@Test
	public void shouldCreateXMLFile_whenCallmarshallToXMLFile()
			throws JAXBException {
		// given
		Object object = new CatalogCreator().createObject();

		// when
		new JaxbHandler().marshallToXMLFile(object, outXmlFile);

	}

	@Test
	public void shouldReturnXMLString_whenCallmarshallToXMLString()
			throws JAXBException {
		// given
		Object object = new CatalogCreator().createObject();

		// when
		String actual = new JaxbHandler().marshallToXMLString(object);

		System.out.println(actual);
	}

}
